home *** CD-ROM | disk | FTP | other *** search
/ MacWorld 2000 January / Macworld (2000-01).dmg / System Utilities / Apple Utilities⁄Updates / MacsBug 6.6.sea / MacsBug 6.6 / Building dcmds / C Samples / Printf.c < prev    next >
MacBinary  |  1999-10-20  |  4.1 KB  |  [TEXT/MPS ]

open in: MacOS 8.1     |     Win98     |     DOS

view JSON data     |     view as text

This file was processed as: MacBinary (archive/macBinary).

You can browse this item here: Printf.c

ConfidenceProgramDetectionMatch TypeSupport
66% dexvert Compact Compressed (Unix) (archive/compact) ext Supported
10% dexvert MacBinary (archive/macBinary) fallback Supported
1% dexvert Text File (text/txt) fallback Supported
100% file MacBinary II, Wed Oct 20 13:00:00 1999, modified Wed Oct 20 13:00:00 1999, creator 'MPS ', type ASCII, 3506 bytes "Printf.c" , at 0xe32 428 bytes resource default (weak)
99% file data default
74% TrID Macintosh plain text (MacBinary) default
25% TrID MacBinary 2 default (weak)
100% siegfried fmt/1762 MacBinary (II) default
100% lsar MacBinary default


id metadata
keyvalue
macFileType[TEXT]
macFileCreator[MPS ]



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 00 08 50 72 69 6e 74 66 | 2e 63 00 00 00 00 00 00 |..Printf|.c......|
|00000010| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000020| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000030| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000040| 00 54 45 58 54 4d 50 53 | 20 00 00 00 00 00 00 00 |.TEXTMPS| .......|
|00000050| 00 00 00 00 00 0d b2 00 | 00 01 ac b4 33 a5 90 b4 |........|....3...|
|00000060| 33 a5 90 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |3.......|........|
|00000070| 00 00 00 00 00 00 00 00 | 00 00 81 81 00 7a 00 00 |........|.....z..|
|00000080| 2f 2a 0d 09 46 69 6c 65 | 3a 09 09 50 72 69 6e 74 |/*..File|:..Print|
|00000090| 66 2e 63 0d 0d 09 43 6f | 6e 74 61 69 6e 73 3a 09 |f.c...Co|ntains:.|
|000000a0| 41 20 64 63 6d 64 20 74 | 68 61 74 20 73 75 70 70 |A dcmd t|hat supp|
|000000b0| 6f 72 74 73 20 74 68 65 | 20 43 20 63 6f 6e 63 65 |orts the| C conce|
|000000c0| 70 74 20 6f 66 20 70 72 | 69 6e 74 66 2e 0d 0d 09 |pt of pr|intf....|
|000000d0| 57 72 69 74 74 65 6e 20 | 62 79 3a 09 4a 4d 33 20 |Written |by:.JM3 |
|000000e0| 3d 20 4a 69 6d 20 4d 75 | 72 70 68 79 0d 09 09 09 |= Jim Mu|rphy....|
|000000f0| 09 44 41 4c 20 3d 20 44 | 61 76 65 20 4c 79 6f 6e |.DAL = D|ave Lyon|
|00000100| 73 0d 09 09 09 09 73 61 | 64 20 3d 20 53 63 6f 74 |s.....sa|d = Scot|
|00000110| 74 20 44 6f 75 67 6c 61 | 73 73 0d 0d 09 43 6f 70 |t Dougla|ss...Cop|
|00000120| 79 72 69 67 68 74 3a 09 | a9 20 31 39 38 39 2c 20 |yright:.|. 1989, |
|00000130| 31 39 39 34 2d 31 39 39 | 36 20 62 79 20 41 70 70 |1994-199|6 by App|
|00000140| 6c 65 20 43 6f 6d 70 75 | 74 65 72 2c 20 49 6e 63 |le Compu|ter, Inc|
|00000150| 2e 2c 20 41 6c 6c 20 52 | 69 67 68 74 73 20 52 65 |., All R|ights Re|
|00000160| 73 65 72 76 65 64 2e 0d | 0d 09 43 68 61 6e 67 65 |served..|..Change|
|00000170| 20 48 69 73 74 6f 72 79 | 20 28 6d 6f 73 74 20 72 | History| (most r|
|00000180| 65 63 65 6e 74 20 66 69 | 72 73 74 29 3a 0d 0d 09 |ecent fi|rst):...|
|00000190| 09 20 3c 35 3e 20 20 20 | 32 35 2d 4a 61 6e 2d 39 |. <5> |25-Jan-9|
|000001a0| 36 09 4a 4d 33 09 09 4c | 65 74 27 73 20 74 72 79 |6.JM3..L|et's try|
|000001b0| 20 74 68 61 74 20 61 67 | 61 69 6e 2e 20 57 65 20 | that ag|ain. We |
|000001c0| 73 75 70 70 6c 79 20 50 | 75 74 2e 63 20 61 73 20 |supply P|ut.c as |
|000001d0| 61 20 6c 69 62 72 61 72 | 79 2c 20 73 6f 20 69 74 |a librar|y, so it|
|000001e0| 0d 09 09 09 09 09 09 09 | 09 09 64 6f 65 73 6e 27 |........|..doesn'|
|000001f0| 74 20 6e 65 65 64 20 63 | 6f 6d 70 69 6c 65 64 2e |t need c|ompiled.|
|00000200| 0d 09 09 20 3c 34 3e 20 | 20 20 32 35 2d 4a 61 6e |... <4> | 25-Jan|
|00000210| 2d 39 36 09 4a 4d 33 09 | 09 46 69 78 65 64 20 74 |-96.JM3.|.Fixed t|
|00000220| 68 65 20 77 61 72 6e 69 | 6e 67 20 69 6e 20 3c 33 |he warni|ng in <3|
|00000230| 3e 20 61 67 61 69 6e 2e | 20 54 68 65 20 6c 61 74 |> again.| The lat|
|00000240| 65 73 74 20 75 6e 69 76 | 65 72 73 61 6c 20 68 65 |est univ|ersal he|
|00000250| 61 64 65 72 73 0d 09 09 | 09 09 09 09 09 09 09 72 |aders...|.......r|
|00000260| 65 2d 69 6e 74 72 6f 64 | 75 63 65 64 20 74 68 69 |e-introd|uced thi|
|00000270| 73 2e 20 55 70 64 61 74 | 65 64 20 74 68 65 20 73 |s. Updat|ed the s|
|00000280| 61 6d 70 6c 65 20 62 75 | 69 6c 64 20 63 6f 6d 6d |ample bu|ild comm|
|00000290| 61 6e 64 73 20 74 6f 20 | 62 65 0d 09 09 09 09 09 |ands to |be......|
|000002a0| 09 09 09 09 63 75 72 72 | 65 6e 74 2e 0d 09 09 20 |....curr|ent.... |
|000002b0| 3c 33 3e 09 20 33 2f 32 | 36 2f 39 35 09 44 41 4c |<3>. 3/2|6/95.DAL|
|000002c0| 09 09 49 6e 63 6c 75 64 | 65 64 20 3c 3a 50 75 62 |..Includ|ed <:Pub|
|000002d0| 6c 69 63 3a 53 74 72 69 | 6e 67 73 2e 68 3e 20 74 |lic:Stri|ngs.h> t|
|000002e0| 6f 20 61 76 6f 69 64 20 | 70 32 63 73 74 72 20 77 |o avoid |p2cstr w|
|000002f0| 61 72 6e 69 6e 67 20 28 | 73 68 6f 75 6c 64 20 66 |arning (|should f|
|00000300| 69 78 0d 09 09 09 09 09 | 09 09 09 09 68 65 61 64 |ix......|....head|
|00000310| 65 72 20 66 69 6c 65 20 | 6e 61 6d 65 73 29 2e 20 |er file |names). |
|00000320| 55 73 65 64 20 6e 65 77 | 20 64 63 6d 64 46 69 6c |Used new| dcmdFil|
|00000330| 6c 56 65 72 73 69 6f 6e | 20 61 6e 64 20 64 63 6d |lVersion| and dcm|
|00000340| 64 46 69 6c 6c 53 74 72 | 69 6e 67 0d 09 09 09 09 |dFillStr|ing.....|
|00000350| 09 09 09 09 09 6d 61 63 | 72 6f 73 2e 0d 09 09 20 |.....mac|ros.... |
|00000360| 3c 32 3e 20 20 20 31 30 | 2d 44 65 63 2d 39 34 09 |<2> 10|-Dec-94.|
|00000370| 4a 4d 33 09 09 55 70 64 | 61 74 65 64 20 66 6f 72 |JM3..Upd|ated for|
|00000380| 20 6e 65 77 20 66 6f 72 | 6d 61 74 20 33 20 64 63 | new for|mat 3 dc|
|00000390| 6d 64 20 72 65 71 75 69 | 72 65 6d 65 6e 74 73 2e |md requi|rements.|
|000003a0| 0d 09 09 20 3c 31 3e 09 | 20 32 2f 31 36 2f 38 39 |... <1>.| 2/16/89|
|000003b0| 09 73 61 64 09 09 77 72 | 69 74 74 65 6e 0d 0d 2a |.sad..wr|itten..*|
|000003c0| 2f 0d 0d 2f 2a 09 54 68 | 69 73 20 69 73 20 6d 6f |/../*.Th|is is mo|
|000003d0| 73 74 6c 79 20 74 6f 20 | 73 68 6f 77 20 68 6f 77 |stly to |show how|
|000003e0| 20 64 63 6d 64 73 20 63 | 61 6e 20 75 73 65 20 74 | dcmds c|an use t|
|000003f0| 68 65 20 73 74 61 6e 64 | 61 72 64 20 43 20 6c 69 |he stand|ard C li|
|00000400| 62 72 61 72 79 2e 0d 0d | 09 54 68 65 20 66 6f 6c |brary...|.The fol|
|00000410| 6c 6f 77 69 6e 67 20 4d | 50 57 20 63 6f 6d 6d 61 |lowing M|PW comma|
|00000420| 6e 64 73 20 77 69 6c 6c | 20 62 75 69 6c 64 20 74 |nds will| build t|
|00000430| 68 65 20 64 63 6d 64 20 | 61 6e 64 20 63 6f 70 79 |he dcmd |and copy|
|00000440| 20 69 74 20 74 6f 20 74 | 68 65 20 22 44 65 62 75 | it to t|he "Debu|
|00000450| 67 67 65 72 20 50 72 65 | 66 73 22 20 66 69 6c 65 |gger Pre|fs" file|
|00000460| 20 0d 09 69 6e 20 74 68 | 65 20 53 79 73 74 65 6d | ..in th|e System|
|00000470| 20 66 6f 6c 64 65 72 2e | 20 54 68 65 20 64 63 6d | folder.| The dcm|
|00000480| 64 27 73 20 6e 61 6d 65 | 20 69 6e 20 4d 61 63 73 |d's name| in Macs|
|00000490| 42 75 67 20 77 69 6c 6c | 20 62 65 20 74 68 65 20 |Bug will| be the |
|000004a0| 6e 61 6d 65 20 6f 66 20 | 74 68 65 20 66 69 6c 65 |name of |the file|
|000004b0| 20 62 75 69 6c 74 20 62 | 79 0d 09 74 68 65 20 4c | built b|y..the L|
|000004c0| 69 6e 6b 65 72 2e 0d 0d | 09 43 20 50 72 69 6e 74 |inker...|.C Print|
|000004d0| 66 2e 63 0d 0d 09 4c 69 | 6e 6b 20 2d 6f 20 50 72 |f.c...Li|nk -o Pr|
|000004e0| 69 6e 74 66 20 2d 73 67 | 20 4d 61 69 6e 3d 53 54 |intf -sg| Main=ST|
|000004f0| 44 43 4c 49 42 2c 53 54 | 44 49 4f 2c 53 41 4e 45 |DCLIB,ST|DIO,SANE|
|00000500| 4c 49 42 20 64 63 6d 64 | 47 6c 75 65 2e 61 2e 6f |LIB dcmd|Glue.a.o|
|00000510| 20 50 75 74 2e 63 2e 6f | 20 50 72 69 6e 74 66 2e | Put.c.o| Printf.|
|00000520| 63 2e 6f 20 b6 0d 09 09 | 22 7b 4c 69 62 72 61 72 |c.o ....|"{Librar|
|00000530| 69 65 73 7d 52 75 6e 74 | 69 6d 65 2e 6f 22 20 22 |ies}Runt|ime.o" "|
|00000540| 7b 43 4c 69 62 72 61 72 | 69 65 73 7d 53 74 64 43 |{CLibrar|ies}StdC|
|00000550| 4c 69 62 2e 6f 22 20 22 | 7b 4c 69 62 72 61 72 69 |Lib.o" "|{Librari|
|00000560| 65 73 7d 49 6e 74 65 72 | 66 61 63 65 2e 6f 22 20 |es}Inter|face.o" |
|00000570| b7 b7 20 64 65 76 3a 6e | 75 6c 6c 0d 09 42 75 69 |.. dev:n|ull..Bui|
|00000580| 6c 64 44 63 6d 64 20 50 | 72 69 6e 74 66 20 31 39 |ldDcmd P|rintf 19|
|00000590| 36 20 2d 66 6f 72 6d 61 | 74 33 0d 09 45 63 68 6f |6 -forma|t3..Echo|
|000005a0| 20 27 69 6e 63 6c 75 64 | 65 20 22 50 72 69 6e 74 | 'includ|e "Print|
|000005b0| 66 22 3b 27 09 7c 09 52 | 65 7a 20 2d 61 20 2d 6f |f";'.|.R|ez -a -o|
|000005c0| 20 22 7b 53 79 73 74 65 | 6d 46 6f 6c 64 65 72 7d | "{Syste|mFolder}|
|000005d0| 44 65 62 75 67 67 65 72 | 20 50 72 65 66 73 22 0d |Debugger| Prefs".|
|000005e0| 2a 2f 0d 0d 23 69 6e 63 | 6c 75 64 65 20 3c 54 79 |*/..#inc|lude <Ty|
|000005f0| 70 65 73 2e 68 3e 0d 0d | 23 69 6e 63 6c 75 64 65 |pes.h>..|#include|
|00000600| 20 3c 73 74 64 69 6f 2e | 68 3e 0d 23 69 6e 63 6c | <stdio.|h>.#incl|
|00000610| 75 64 65 20 3c 73 74 72 | 69 6e 67 2e 68 3e 0d 23 |ude <str|ing.h>.#|
|00000620| 69 6e 63 6c 75 64 65 20 | 3c 54 65 78 74 55 74 69 |include |<TextUti|
|00000630| 6c 73 2e 68 3e 0d 23 69 | 6e 63 6c 75 64 65 20 3c |ls.h>.#i|nclude <|
|00000640| 4d 65 6d 6f 72 79 2e 68 | 3e 0d 0d 23 69 6e 63 6c |Memory.h|>..#incl|
|00000650| 75 64 65 20 22 64 63 6d | 64 2e 68 22 0d 23 69 6e |ude "dcm|d.h".#in|
|00000660| 63 6c 75 64 65 20 22 70 | 75 74 2e 68 22 0d 0d 70 |clude "p|ut.h"..p|
|00000670| 61 73 63 61 6c 20 76 6f | 69 64 20 43 6f 6d 6d 61 |ascal vo|id Comma|
|00000680| 6e 64 45 6e 74 72 79 28 | 64 63 6d 64 42 6c 6f 63 |ndEntry(|dcmdBloc|
|00000690| 6b 2a 20 70 61 72 61 6d | 50 74 72 29 0d 7b 0d 0d |k* param|Ptr).{..|
|000006a0| 09 73 74 61 74 69 63 20 | 63 6f 6e 73 74 20 63 68 |.static |const ch|
|000006b0| 61 72 20 75 73 61 67 65 | 53 74 72 5b 5d 20 3d 20 |ar usage|Str[] = |
|000006c0| 22 5c 70 5c 22 66 6f 72 | 6d 61 74 5c 22 20 61 72 |"\p\"for|mat\" ar|
|000006d0| 67 2e 2e 2e 22 3b 0d 0d | 09 73 77 69 74 63 68 20 |g...";..|.switch |
|000006e0| 28 70 61 72 61 6d 50 74 | 72 2d 3e 72 65 71 75 65 |(paramPt|r->reque|
|000006f0| 73 74 29 0d 09 7b 0d 09 | 09 63 61 73 65 20 64 63 |st)..{..|.case dc|
|00000700| 6d 64 49 6e 69 74 3a 0d | 09 09 09 62 72 65 61 6b |mdInit:.|...break|
|00000710| 3b 0d 0d 09 09 63 61 73 | 65 20 64 63 6d 64 48 65 |;....cas|e dcmdHe|
|00000720| 6c 70 3a 0d 09 09 09 64 | 63 6d 64 44 72 61 77 4c |lp:....d|cmdDrawL|
|00000730| 69 6e 65 28 22 5c 70 44 | 69 73 70 6c 61 79 73 20 |ine("\pD|isplays |
|00000740| 74 68 65 20 61 72 67 75 | 6d 65 6e 74 73 20 61 63 |the argu|ments ac|
|00000750| 63 6f 72 64 69 6e 67 20 | 74 6f 20 74 68 65 20 66 |cording |to the f|
|00000760| 6f 72 6d 61 74 20 28 6e | 6f 20 66 6c 6f 61 74 69 |ormat (n|o floati|
|00000770| 6e 67 20 70 6f 69 6e 74 | 29 2e 22 29 3b 0d 09 09 |ng point|).");...|
|00000780| 09 62 72 65 61 6b 3b 0d | 0d 09 09 63 61 73 65 20 |.break;.|...case |
|00000790| 64 63 6d 64 47 65 74 49 | 6e 66 6f 3a 0d 09 09 09 |dcmdGetI|nfo:....|
|000007a0| 64 63 6d 64 46 69 6c 6c | 56 65 72 73 69 6f 6e 28 |dcmdFill|Version(|
|000007b0| 70 61 72 61 6d 50 74 72 | 2c 20 30 78 30 33 30 30 |paramPtr|, 0x0300|
|000007c0| 38 30 30 30 29 3b 09 2f | 2f 20 76 65 72 73 69 6f |8000);./|/ versio|
|000007d0| 6e 20 33 2e 30 0d 09 09 | 09 64 63 6d 64 46 69 6c |n 3.0...|.dcmdFil|
|000007e0| 6c 53 74 72 69 6e 67 28 | 70 61 72 61 6d 50 74 72 |lString(|paramPtr|
|000007f0| 2c 20 75 73 61 67 65 53 | 74 72 2c 20 75 73 61 67 |, usageS|tr, usag|
|00000800| 65 53 74 72 29 3b 0d 09 | 09 09 62 72 65 61 6b 3b |eStr);..|..break;|
|00000810| 0d 0d 09 09 63 61 73 65 | 20 64 63 6d 64 44 6f 49 |....case| dcmdDoI|
|00000820| 74 3a 0d 09 09 7b 0d 09 | 09 09 53 74 72 32 35 35 |t:...{..|..Str255|
|00000830| 20 66 6f 72 6d 61 74 73 | 74 72 69 6e 67 3b 0d 09 | formats|tring;..|
|00000840| 09 09 75 6e 73 69 67 6e | 65 64 20 63 68 61 72 2a |..unsign|ed char*|
|00000850| 20 66 6f 72 6d 61 74 70 | 20 3d 20 66 6f 72 6d 61 | formatp| = forma|
|00000860| 74 73 74 72 69 6e 67 3b | 0d 09 09 09 53 74 72 32 |tstring;|....Str2|
|00000870| 35 35 20 66 6f 72 6d 61 | 74 74 65 64 73 74 72 69 |55 forma|ttedstri|
|00000880| 6e 67 3b 0d 0d 09 09 09 | 64 63 6d 64 53 77 61 70 |ng;.....|dcmdSwap|
|00000890| 57 6f 72 6c 64 73 28 29 | 3b 09 09 09 2f 2f 20 6e |Worlds()|;...// n|
|000008a0| 6f 74 20 72 65 61 6c 6c | 79 20 6e 65 63 65 73 73 |ot reall|y necess|
|000008b0| 61 72 79 20 62 65 63 61 | 75 73 65 20 77 65 20 64 |ary beca|use we d|
|000008c0| 6f 6e d5 74 20 61 63 63 | 65 73 73 20 6d 61 63 68 |on.t acc|ess mach|
|000008d0| 69 6e 65 20 73 74 61 74 | 65 0d 0d 09 09 09 28 76 |ine stat|e.....(v|
|000008e0| 6f 69 64 29 64 63 6d 64 | 47 65 74 4e 65 78 74 50 |oid)dcmd|GetNextP|
|000008f0| 61 72 61 6d 65 74 65 72 | 28 66 6f 72 6d 61 74 73 |arameter|(formats|
|00000900| 74 72 69 6e 67 29 3b 0d | 0d 09 09 09 70 32 63 73 |tring);.|....p2cs|
|00000910| 74 72 28 66 6f 72 6d 61 | 74 73 74 72 69 6e 67 29 |tr(forma|tstring)|
|00000920| 3b 0d 0d 09 09 09 77 68 | 69 6c 65 20 28 2a 66 6f |;.....wh|ile (*fo|
|00000930| 72 6d 61 74 70 20 21 3d | 20 27 5c 30 27 29 0d 09 |rmatp !=| '\0')..|
|00000940| 09 09 7b 0d 09 09 09 09 | 63 68 61 72 20 61 66 6f |..{.....|char afo|
|00000950| 72 6d 61 74 73 70 65 63 | 5b 32 35 36 5d 3b 0d 09 |rmatspec|[256];..|
|00000960| 09 09 09 73 69 7a 65 5f | 74 20 73 70 65 63 6c 65 |...size_|t specle|
|00000970| 6e 67 74 68 3b 0d 09 09 | 09 09 6c 6f 6e 67 20 61 |ngth;...|..long a|
|00000980| 72 67 3b 0d 09 09 09 09 | 42 6f 6f 6c 65 61 6e 20 |rg;.....|Boolean |
|00000990| 6f 6b 3b 0d 0d 09 09 09 | 09 2f 2f 20 46 69 6e 64 |ok;.....|.// Find|
|000009a0| 20 74 68 65 20 6e 65 78 | 74 20 66 6f 72 6d 61 74 | the nex|t format|
|000009b0| 20 73 70 65 63 20 28 69 | 2e 65 2e 20 25 64 29 20 | spec (i|.e. %d) |
|000009c0| 61 6e 64 20 70 72 69 6e | 74 20 6f 75 74 20 61 6e |and prin|t out an|
|000009d0| 79 74 68 69 6e 67 20 62 | 65 66 6f 72 65 20 69 74 |ything b|efore it|
|000009e0| 0d 09 09 09 0d 09 09 09 | 09 63 68 61 72 2a 20 6e |........|.char* n|
|000009f0| 65 78 74 70 20 3d 20 73 | 74 72 63 68 72 28 66 6f |extp = s|trchr(fo|
|00000a00| 72 6d 61 74 70 2c 20 27 | 25 27 29 3b 0d 09 09 09 |rmatp, '|%');....|
|00000a10| 09 69 66 20 28 6e 65 78 | 74 70 20 3d 3d 20 6e 69 |.if (nex|tp == ni|
|00000a20| 6c 29 20 6e 65 78 74 70 | 20 3d 20 66 6f 72 6d 61 |l) nextp| = forma|
|00000a30| 74 70 20 2b 20 73 74 72 | 6c 65 6e 28 66 6f 72 6d |tp + str|len(form|
|00000a40| 61 74 70 29 3b 0d 0d 09 | 09 09 09 50 75 74 42 79 |atp);...|...PutBy|
|00000a50| 74 65 73 54 6f 28 66 6f | 72 6d 61 74 70 2c 20 6e |tesTo(fo|rmatp, n|
|00000a60| 65 78 74 70 20 2d 20 66 | 6f 72 6d 61 74 70 2c 20 |extp - f|ormatp, |
|00000a70| 30 29 3b 0d 09 09 09 09 | 66 6f 72 6d 61 74 70 20 |0);.....|formatp |
|00000a80| 3d 20 6e 65 78 74 70 3b | 0d 0d 09 09 09 09 2f 2f |= nextp;|......//|
|00000a90| 20 46 69 6e 64 20 74 68 | 65 20 6c 65 6e 67 74 68 | Find th|e length|
|00000aa0| 20 6f 66 20 74 68 65 20 | 66 6f 72 6d 61 74 20 73 | of the |format s|
|00000ab0| 70 65 63 0d 09 09 09 0d | 09 09 09 09 73 70 65 63 |pec.....|....spec|
|00000ac0| 6c 65 6e 67 74 68 20 3d | 20 73 74 72 63 73 70 6e |length =| strcspn|
|00000ad0| 28 66 6f 72 6d 61 74 70 | 20 2b 20 31 2c 20 22 64 |(formatp| + 1, "d|
|00000ae0| 69 6f 75 78 58 63 73 70 | 50 25 22 29 20 2b 20 32 |iouxXcsp|P%") + 2|
|00000af0| 3b 09 2f 2f 20 77 65 20 | 64 6f 6e d5 74 20 64 6f |;.// we |don.t do|
|00000b00| 20 22 66 65 45 67 47 6e | 22 0d 09 09 09 09 6d 65 | "feEgGn|".....me|
|00000b10| 6d 63 70 79 28 61 66 6f | 72 6d 61 74 73 70 65 63 |mcpy(afo|rmatspec|
|00000b20| 2c 20 66 6f 72 6d 61 74 | 70 2c 20 73 70 65 63 6c |, format|p, specl|
|00000b30| 65 6e 67 74 68 29 3b 0d | 09 09 09 09 61 66 6f 72 |ength);.|....afor|
|00000b40| 6d 61 74 73 70 65 63 5b | 73 70 65 63 6c 65 6e 67 |matspec[|specleng|
|00000b50| 74 68 5d 20 3d 20 27 5c | 30 27 3b 0d 09 09 09 09 |th] = '\|0';.....|
|00000b60| 28 76 6f 69 64 29 64 63 | 6d 64 47 65 74 4e 65 78 |(void)dc|mdGetNex|
|00000b70| 74 45 78 70 72 65 73 73 | 69 6f 6e 28 26 61 72 67 |tExpress|ion(&arg|
|00000b80| 2c 20 26 6f 6b 29 3b 0d | 09 09 09 09 69 66 20 28 |, &ok);.|....if (|
|00000b90| 21 6f 6b 29 20 62 72 65 | 61 6b 3b 0d 0d 09 09 09 |!ok) bre|ak;.....|
|00000ba0| 09 73 70 72 69 6e 74 66 | 28 66 6f 72 6d 61 74 74 |.sprintf|(formatt|
|00000bb0| 65 64 73 74 72 69 6e 67 | 2c 20 61 66 6f 72 6d 61 |edstring|, aforma|
|00000bc0| 74 73 70 65 63 2c 20 61 | 72 67 29 3b 0d 09 09 09 |tspec, a|rg);....|
|00000bd0| 09 50 75 74 43 53 74 72 | 28 66 6f 72 6d 61 74 74 |.PutCStr|(formatt|
|00000be0| 65 64 73 74 72 69 6e 67 | 29 3b 0d 09 09 09 09 66 |edstring|);.....f|
|00000bf0| 6f 72 6d 61 74 70 20 3d | 20 66 6f 72 6d 61 74 70 |ormatp =| formatp|
|00000c00| 20 2b 20 73 70 65 63 6c | 65 6e 67 74 68 3b 0d 09 | + specl|ength;..|
|00000c10| 09 09 7d 0d 09 09 09 50 | 75 74 4c 69 6e 65 28 29 |..}....P|utLine()|
|00000c20| 3b 0d 0d 09 09 09 64 63 | 6d 64 53 77 61 70 57 6f |;.....dc|mdSwapWo|
|00000c30| 72 6c 64 73 28 29 3b 0d | 09 09 7d 0d 09 09 09 62 |rlds();.|..}....b|
|00000c40| 72 65 61 6b 3b 0d 0d 09 | 09 2f 2f 20 56 65 72 73 |reak;...|.// Vers|
|00000c50| 69 6f 6e 20 33 20 61 6e | 64 20 6e 65 77 65 72 20 |ion 3 an|d newer |
|00000c60| 64 63 6d 64 73 20 6d 75 | 73 74 20 71 75 69 65 74 |dcmds mu|st quiet|
|00000c70| 6c 79 20 69 67 6e 6f 72 | 65 20 72 65 71 75 65 73 |ly ignor|e reques|
|00000c80| 74 73 20 77 65 20 64 6f | 6e 27 74 20 72 65 63 6f |ts we do|n't reco|
|00000c90| 67 6e 69 7a 65 2e 0d 09 | 0d 09 09 64 65 66 61 75 |gnize...|...defau|
|00000ca0| 6c 74 3a 0d 09 09 09 62 | 72 65 61 6b 3b 0d 09 7d |lt:....b|reak;..}|
|00000cb0| 0d 0d 7d 20 2f 2f 20 43 | 6f 6d 6d 61 6e 64 45 6e |..} // C|ommandEn|
|00000cc0| 74 72 79 0d 0d 2f 2a 0d | 09 74 68 65 20 66 6f 6c |try../*.|.the fol|
|00000cd0| 6c 6f 77 69 6e 67 20 61 | 72 65 20 73 74 75 62 73 |lowing a|re stubs|
|00000ce0| 20 74 6f 20 6f 76 65 72 | 72 69 64 65 20 74 68 65 | to over|ride the|
|00000cf0| 20 43 20 6c 69 62 72 61 | 72 79 20 72 6f 75 74 69 | C libra|ry routi|
|00000d00| 6e 65 73 20 73 6f 20 74 | 68 61 74 20 74 68 65 20 |nes so t|hat the |
|00000d10| 64 63 6d 64 20 69 73 6e | d5 74 0d 09 73 6f 20 62 |dcmd isn|.t..so b|
|00000d20| 69 67 2e 0d 2a 2f 0d 0d | 73 69 7a 65 5f 74 20 66 |ig..*/..|size_t f|
|00000d30| 77 72 69 74 65 20 28 63 | 6f 6e 73 74 20 76 6f 69 |write (c|onst voi|
|00000d40| 64 20 2a 2c 20 73 69 7a | 65 5f 74 2c 20 73 69 7a |d *, siz|e_t, siz|
|00000d50| 65 5f 74 2c 20 46 49 4c | 45 20 2a 29 20 7b 20 72 |e_t, FIL|E *) { r|
|00000d60| 65 74 75 72 6e 20 30 3b | 20 7d 09 09 2f 2f 20 77 |eturn 0;| }..// w|
|00000d70| 6f 6e 74 d5 74 20 61 63 | 74 75 61 6c 6c 79 20 62 |ont.t ac|tually b|
|00000d80| 65 20 63 61 6c 6c 65 64 | 20 62 79 20 73 70 72 69 |e called| by spri|
|00000d90| 6e 74 66 0d 5f 66 6c 73 | 62 75 66 28 29 20 7b 7d |ntf._fls|buf() {}|
|00000da0| 09 2f 2f 20 77 6f 6e 74 | d5 74 20 61 63 74 75 61 |.// wont|.t actua|
|00000db0| 6c 6c 79 20 62 65 20 63 | 61 6c 6c 65 64 20 62 79 |lly be c|alled by|
|00000dc0| 20 73 70 72 69 6e 74 66 | 0d 0d 66 63 76 74 28 29 | sprintf|..fcvt()|
|00000dd0| 20 7b 7d 09 09 2f 2f 20 | 75 73 65 64 20 6f 6e 6c | {}..// |used onl|
|00000de0| 79 20 66 6f 72 20 66 6c | 6f 61 74 69 6e 67 20 70 |y for fl|oating p|
|00000df0| 6f 69 6e 74 20 25 66 2c | 20 65 74 63 2e 0d 65 63 |oint %f,| etc..ec|
|00000e00| 76 74 28 29 20 7b 7d 09 | 09 2f 2f 20 75 73 65 64 |vt() {}.|.// used|
|00000e10| 20 6f 6e 6c 79 20 66 6f | 72 20 66 6c 6f 61 74 69 | only fo|r floati|
|00000e20| 6e 67 20 70 6f 69 6e 74 | 20 25 65 2c 20 65 74 63 |ng point| %e, etc|
|00000e30| 2e 0d 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000e40| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000e50| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000e60| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000e70| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000e80| 00 00 01 00 00 00 01 66 | 00 00 00 66 00 00 00 46 |.......f|...f...F|
|00000e90| 6b 4f 54 50 6f 72 74 49 | 73 53 79 73 74 65 6d 52 |kOTPortI|sSystemR|
|00000ea0| 65 67 69 73 74 65 72 65 | 64 09 3d 20 30 78 30 30 |egistere|d.= 0x00|
|00000eb0| 08 50 72 69 6e 74 66 2e | 63 79 20 49 74 65 6d 73 |.Printf.|cy Items|
|00000ec0| 61 6e 65 6c 38 2e 31 2e | 73 6d 69 6f 6c 64 65 72 |anel8.1.|smiolder|
|00000ed0| 00 30 54 45 58 54 4d 50 | 53 20 00 00 00 40 00 01 |.0TEXTMP|S ...@..|
|00000ee0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000ef0| 00 00 b4 33 5f 40 00 00 | 0d b2 00 00 01 ac 2f 2a |...3_@..|....../*|
|00000f00| 0d 20 20 20 4f 6e 65 20 | 4f 54 50 6f 72 74 52 65 |. One |OTPortRe|
|00000f10| 63 6f 72 64 20 69 73 20 | 63 72 65 61 74 65 64 20 |cord is |created |
|00000f20| 66 6f 72 20 65 61 63 68 | 20 69 6e 73 74 61 6e 63 |for each| instanc|
|00000f30| 65 20 6f 66 20 61 20 70 | 6f 72 74 2e 0d 20 20 20 |e of a p|ort.. |
|00000f40| 46 6f 72 20 49 6e 73 74 | 61 6e 63 65 20 27 65 6e |For Inst|ance 'en|
|00000f50| 65 74 27 20 69 64 65 6e | 74 69 66 69 65 73 20 61 |et' iden|tifies a|
|00000f60| 6e 20 65 74 68 65 72 6e | 65 74 20 70 6f 72 74 2e |n ethern|et port.|
|00000f70| 0d 20 20 20 41 20 4f 54 | 50 6f 72 74 52 65 63 6f |. A OT|PortReco|
|00000f80| 00 00 00 36 06 60 80 00 | 00 00 03 36 2e 36 2b 36 |...6.`..|...6.6+6|
|00000f90| 2e 36 2c 20 43 6f 70 79 | 72 69 67 68 74 20 41 70 |.6, Copy|right Ap|
|00000fa0| 70 6c 65 20 43 6f 6d 70 | 75 74 65 72 2c 20 49 6e |ple Comp|uter, In|
|00000fb0| 63 2e 20 31 39 38 31 2d | 39 39 00 00 00 28 02 06 |c. 1981-|99...(..|
|00000fc0| 60 80 00 08 50 72 69 6e | 74 66 2e 63 00 00 00 00 |`...Prin|tf.c....|
|00000fd0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000fe0| 00 00 00 00 00 00 00 00 | 01 00 00 00 01 66 00 00 |........|.....f..|
|00000ff0| 00 66 00 00 00 46 0d 59 | cb 08 17 24 00 00 00 1c |.f...F.Y|...$....|
|00001000| 00 46 00 01 76 65 72 73 | 00 00 00 12 66 74 61 67 |.F..vers|....ftag|
|00001010| 00 00 00 1e 00 01 ff ff | 20 00 00 00 00 00 00 00 |........| .......|
|00001020| 00 00 ff ff 00 00 00 3a | 0d 59 cd 34 00 00 00 00 |.......:|.Y.4....|
|00001030| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001040| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001050| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001060| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001070| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
+--------+-------------------------+-------------------------+--------+--------+